package net.tensor.consumer.tensorconsumer.config;

import org.apache.rocketmq.common.message.Message;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.stereotype.Service;

import java.util.Arrays;

/**
 * @author Q
 */
@Service
public class ConsumerReceive {

    @StreamListener("input")
    public void receiveInput(Message message) {
        System.out.println("消息："+
                message.getTopic() + "--"
                        + message.getTags() + "--"
                        + message.getKeys() + "--"
                        + Arrays.toString(message.getBody()));
    }
}
